﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Text;
using ContactManager.Models.Entities;
using NHibernate.Criterion;

namespace ContactManager.Models.Repositories
{
    public interface IGroupManagerRepository
    {
   

        

        T LoadById<T>(Guid key) where T : class;
        IList<T> ListAll<T>() where T : class;

        void Create<T>(T instance) where T : class;
        void Edit<T, Y>(T instance, Y fromSession)
            where T : class
            where Y : class;
        void Delete<T>(T instance) where T : class;

        T GetFirst<T>(ICriterion[] criteria) where T : class;
        IList<T> FindResults<T>(ICriterion[] criteria) where T : class;

        IList<Contact> FindContactsBetweenDates(string field, DateTime date1, DateTime date2);
        IList<Contact> FindContactsBy(char initial, string field);

        ContactGroup GetFirstGroup();

        //IList<T> FindResults<T>(ICriterion[] criteria) where T : class;

        //Contact Add(Guid groupId,Contact ContactToCreate);
        //void EditContact(Contact contactToUpdate);
        //void Delete(Contact contactToDelete);


        //// Group methods

        //ContactGroup EditGroup(ContactGroup groupToUpdate);
        //void DeleteGroup(ContactGroup groupToDelete);
        //ContactGroup CreateGroup(ContactGroup groupToCreate);
        //List<ContactGroup> ListGroups();
        // List<ContactGroup> FindAllGroups();
        //ContactGroup GetFirstGroup();
        //ContactGroup GetGroup(System.Guid id);
        
        
    }
}
